<html>
    <head>
        <title>Test</title>
        <style></style>
        <script type="text/tiscript">

          var audio;

          event click $(#play) (evt, button) 
          {

            var meter = $(#play-status);

            button.state.disabled = true;
            audio = view.audio(self.url("hasta-lavista-baby.mp3")).volume(0.5);

            audio << event heartbit { meter.value = (audio.progress * 100).toInteger(); }
                  << event stop { button.state.disabled = false;  meter.value = 100; };

            audio.play();
          }

          event change $(#pause) {
            if(this.value)
              audio.pause();
            else
              audio.play(); 
          }

        </script>
    </head>
    <body>

       <button#play>Play</button>
       <button|checkbox#pause>Paused</button>
       <meter #play-status max="100" />

    </body>
</html>